<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<LINK href="showAllOrg.files/style.htm" rel=stylesheet>
		<LINK href="showAllOrg.files/content.htm" rel=stylesheet>
		
 		<script type="text/javascript">
		    var djConfig = {
				isDebug:true,
				parseOnLoad:true,
				usePlainJson:true
		    };
		</script>
		 
		<script type="text/javascript" src="dojo/dojo/dojo.js"></script>
		<script type="text/javascript" src="dojo/dijit/dijit.js"></script>

		<script type="text/javascript">
    		dojo.require("dijit.form.Button");
    		dojo.require("dojo.rpc.JsonService");    	
    	</script>
    	<script language="JavaScript" type="text/javascript">
    		var orderBoxService = new dojo.rpc.JsonService("box/order/OrderBoxService?smd");
    		var orderPlanImportService = new dojo.rpc.JsonService("box/alloc/OrderPlanImportService?smd");
			var makeShipperNoteService = new dojo.rpc.JsonService("box/order/MakeShipperNoteService?smd");
			var declareService = new dojo.rpc.JsonService("DeclareService?smd");
			
    		//页面加载时的一些操作
			dojo.addOnLoad(load);
			function load() {
				initPage();
			}
			function initPage() {
				makeShipperNoteService.getOrderPlan().addCallback(function (orderPlan) {
					makeShipperNoteService.getAllocDetails().addCallback(function (ad) {
						makeShipperNoteService.getShipperNote().addCallback(function (sn) {
							declareService.getDeclareComitByCommId(ad.commission.id).addCallback(function (dc) {
								console.dir(dc);
								console.dir(ad);
								document.getElementById("sn_id1").value = sn.id + "号委托报关明细";
								document.getElementById("date").innerHTML = showDate();
								document.getElementById("dcId").innerHTML = dc.id;
								document.getElementById("blId").innerHTML = dc.BLInfo.id;
								
								document.getElementById("shipname").innerHTML = orderPlan.shipSchedule.shipInfo.name;
								document.getElementById("shipcom").innerHTML = orderPlan.shipSchedule.shipInfo.shipComInfo.shortTitle;
								document.getElementById("scd_id").innerHTML = orderPlan.shipSchedule.id;
								document.getElementById("sender_name").innerHTML = ad.commission.sender.name;
								document.getElementById("load_port").innerHTML = ad.commission.departure;
								document.getElementById("destination1").innerHTML = ad.commission.destination;
								document.getElementById("destination2").innerHTML = ad.commission.destination;
								makeShipperNoteService.getBoxAndGoods(sn.id).addCallback(function (BAG) {
									console.dir(BAG);
									var boxNum = 0;
									for (var i in BAG.list) {
										boxNum = boxNum + 1;
									}
									
									document.getElementById("boxNum").innerHTML = boxNum;		
									document.getElementById("cy").innerHTML = BAG.list[0].box.CYInfo.name;
								});
								document.getElementById("goodsType").innerHTML = ad.commission.goods.type;
							});
						});
					});
				});
			}
			//得到当前日期
			function showDate() {
				var today = new Date();   
				var day = today.getDate();   
				var month = today.getMonth() + 1;   
				var year = today.getFullYear();   
				return year + "-" + month + "-" + day;
			}
			//查看报关委托书
			function show_declare_comit() {
				makeShipperNoteService.getAllocDetails().addCallback(function (ad) {
					declareService.setCommId(ad.commission.id).addCallback(function () {
						window.open("打印报关委托书明细.htm", "_self");
					});
				});
			}
			//报关单明细
			function show_declare_form() {
				window.open("报关单明细列表.htm", "_self");
			}
			//报关
			function declare() {
				alert("报关成功！");
				window.open("业务流程跟踪管理.htm", "_self");
			}
    	</script>
<title>报关管理</title>
 
</head>
<script language="javascript">
function bgwt(){
  var m_url = "打印报关委托书明细.htm";
  var ppp = window.open(m_url,"","top=30,left=50,width=600,height=700, menubar=0,toolsbar=0,status=1,scrollbars=1,resizable=1");
  ppp.focus();
}

function bgdlb(){
  var m_url = "报关单列表.htm";
  var ppp = window.open(m_url,"","top=30,left=50,width=800,height=300, menubar=0,toolsbar=0,status=1,scrollbars=0,resizable=1");
  ppp.focus();
}

</script>

<body>

<font face="隶书" color="3656B9" ; style="font-size: 18px;">报关管理</font><br>
<img src="showAllOrg.files/line2.gif"><br>

<center>

	<table width="700" border="0" cellpadding="0" cellspacing="0" >		
     	 <tr height="80">
       <td class="ctitle" ><input id="sn_id1" class ="billtitle" value="10022号委托报关明细" size=40></td>
      </tr>
	</table>

	<table width="760" border="0" cellpadding="0" cellspacing="0" >
   
	</table>

	<table  class="titlearea" width="760" border="0" cellpadding="2" cellspacing="1">
      <tr >
			 <td		class="rtitle" width=95>*运输日期：</td>
			
          <td id="date" 	class="ltitle">2008-01-02         
          </td> 
          <td		class="rtitle" width=95>*报关委托编号：</td>
          <td  id="dcId"	class="ltitle">10022         
          </td>
		  <td		class="rtitle" width=95>*提单号：</td>
          <td id="blId" 	class="ltitle">1003311         
          </td>
      </tr >
		   <tr>
		   <td		class="rtitle" width=95>发货人：</td>
          <td  id="sender_name"	class="ltitle">威海出口公司         
          </td>
		   <td		class="rtitle" width=95>代理：</td>
          <td  	class="ltitle">哈工大货代        
          </td>
		  <td		class="rtitle" width=95>海关：</td>
          <td  	class="ltitle"><input type="text" name="Bill_desc"
          value="威海海关" 	  size=10 class="linput" >         
          </td>
		  </tr>

             <tr >
			 <td		class="rtitle" width=95>船公司名：</td>
			
          <td id="shipcom" 	class="ltitle">华东海运         
          </td> 
          <td		class="rtitle" width=95>船名：</td>
          <td id="shipname" 	class="ltitle">华东明珠2号         
          </td>
		  <td		class="rtitle" width=95>船次：</td>
          <td  id="scd_id"	class="ltitle">1342         
          </td>
		   </tr >
		   
		   <tr >
			 <td		class="rtitle" width=95>装货港：</td>
			
          <td  id="load_port"	class="ltitle">SHIDAO,CHINA</td> 
          <td		class="rtitle" width=95>目的港：</td>
          <td  id="destination1"	class="ltitle">INCHON,KOREA         
          </td>
		  <td		class="rtitle" width=95>卸货港：</td>
          <td  id="destination2"	class="ltitle">INCHON,KOREA         
          </td>
		   </tr >
		   <tr >
			 <td		class="rtitle" width=95>集装箱数：</td>
			
          <td id="boxNum" 	class="ltitle">5         
          </td> 
          <td		class="rtitle" width=95>货物种类：</td>
          <td id="goodsType" 	class="ltitle">普通         
          </td>
		  <td		class="rtitle" width=95>装箱场站名称：</td>
          <td id="cy" 	class="ltitle">威海场站</td>
		   </tr >
		   <tr >
			 <td colspan="2" align="center" ><a href="javascript:show_declare_comit()">查看报关委托书</a></td>
             <td colspan="2"	align="center"	><a href="javascript:show_declare_form()">查看报关单</a></td>
         
		   </tr >
			
	  <tr>
          <td class="rtitle">审批状态：</td>
          <td class="ltitle">  
          
			单证齐全</td>
          <td class="rtitle">审批流程：</td><td class="ltitle" colspan="3">        
          <input name="Check_flow_id"   type="hidden" value="StoreStart001" size="10" class="linputrl">
          <input name="Check_flow_name" type="text"   value="未报关" size="20" class="linputr">
          <input name="Audit_state_flag" type="hidden" value="S" size="10" class="linputrl">
          </td>
      </tr>
	  
	</table>

<table width="760">
    <tr>
      <td class="rtitle">
	   
	    
	  是否通过：
			<select name = "Audit_flag">
				<option value="">&nbsp;</option>
				<option value="Y">通过</option>
				<option value="N">不通过</option>
			</select>
      审核意见：<input name="Audit_option" size=20  class="linput">
      <font face="Webdings" class="redcolor">4</font><a href="javascript:declare()">报关</a>
      
   
      
	   
	  
	    
      <font face="Webdings" class="redcolor">4</font><a href="javascript:myClose()">关闭</a>
      
      
      <font face="Webdings" class="redcolor">4</font><a href="舱位预分配计划.htm">返回</a>
      
	  </td>
	</tr>
</table>
</center>

</body>
</html>


